package com.xuecheng.api.content;

import com.xuecheng.api.content.model.dto.CourseBaseDTO;
import com.xuecheng.api.content.model.qo.QueryCourseModel;
import com.xuecheng.api.content.model.vo.CourseAuditVo;
import com.xuecheng.api.content.model.vo.CourseBaseVo;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * <p>
 *  课程基本信息Api接口
 * <p/>
 */
@Api(value = "课程基本信息Api接口",tags = "对课程内容基本信息操作Api接口")
public interface CourseBaseApi {


    /**
     * 课程基本信息分页查询方法
     * @param params  分页参数的封装类
     * @param model 分页条件
     * @return  分页结果数据
     */
    @ApiOperation("分页查询课程基本信息方法")
    PageVO queryCourseList(PageRequestParams params, QueryCourseModel model);


    /**
     * 保存课程信息方法：课程基本信息内容、课程营销内容
     * @param courseBaseVo 封装前端传来数据的实体类
     * @return  课程信息
     */
    @ApiOperation(value = "保存课程信息方法")
    @ApiImplicitParam(name = "CourseBaseVo",required = true,dataType = "CourseBaseVo",paramType = "body")
    CourseBaseDTO creatCourseBase(CourseBaseVo courseBaseVo);


    /**
     * 根据id查询课程信息
     * @param courseBaseId 课程信息
     * @return 课程信息
     */
    @ApiOperation(value = "根据id查询课程信息")
    @ApiImplicitParam(name = "queryById" ,required = true,dataType = "String" ,paramType = "path")
    CourseBaseDTO queryCourseById(Long courseBaseId);

    /**
     * 修改课程信息
     * @param courseBaseVo 封装前端传来数据的实体类
     * @return  课程信息
     */
    @ApiOperation(value = "修改课程信息")
    @ApiImplicitParam(name = "modifyCourse",required = true,dataType = "CourseBaseVo",paramType = "body")
    CourseBaseDTO modifyCourse(CourseBaseVo courseBaseVo);


    /**
     * 根据课程id删除课程信息
     * @param CourseBaseId 课程信息id
     */
    @ApiOperation(value = "根据课程id删除课程")
    @ApiImplicitParam(name = "deleteCourseBase" ,required = true,dataType = "Long" ,paramType = "path")
    void deleteCourseBase(Long CourseBaseId);


    @ApiOperation(value = "机构提交课程")
    @ApiImplicitParam(name = "courseBaseId",required = true,dataType = "Long",paramType = "path")
    void submitCourseBase(Long courseBaseId);


    /**
     * 运营平台分页查询所有教育机构课程信息
     * @param params 分页查询的参数
     * @param model 分页查询的条件
     * @return   分页结果数据
     */
    @ApiOperation(value = "运营平台分页查询课程信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "PageRequestParams",value = "分页查询的参数" ,dataType = "PageRequestParams",paramType = "query"),
            @ApiImplicitParam(name = "QueryCourseModel",value = "分页查询的条件" ,dataType = "QueryCourseModel",paramType = "body"),
    })
    PageVO runQueryCourseList(PageRequestParams params , QueryCourseModel model);


    /**
     * 运营平台审核教育机构课程
     * @param courseAuditVo   审核状态 审核意见
     */
    @ApiOperation(value = "运营平台审核教育机构课程")
    @ApiImplicitParam(value = "modifyCourseAudit",required = true,dataType = "CourseAuditVo",paramType = "body")
    void modifyCourseAudit(CourseAuditVo courseAuditVo);


    /**
     * 课程预览
     * @param courseBaseId  课程信息id
     * @param companyId 公司id
     * @return  完整的html页面
     */
    Object CoursePreview(Long courseBaseId,Long companyId);
}
